import { ApiResult, post, get } from "@/util/request";

//加入题库
export async function addQuestion(params?: any): Promise<ApiResult<any>> {
  return await get<any>("/manage/v1/questionImport/addQuestion", params);
}
//删除导入记录
export async function delQuestionImport(params?: any): Promise<ApiResult<any>> {
  return await get<any>("/manage/v1/questionImport/delQuestionImport", params);
}
//文件分页
export async function pageQuestionImport(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>(
    "/manage/v1/questionImport/pageQuestionImport",
    params,
  );
}
//题库明细分页
export async function pageQuestionImportDetail(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/question/pageQuestionDetail", params);
}
//下载模版
export async function uploadTemplate(params?: any): Promise<ApiResult<any>> {
  return await get<any>("/manage/v1/questionImport/uploadUrl", params);
}

//导入题库
export async function read(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/questionImport/read", params);
}

//题库明细
export async function questionImportDetail(
  params?: any,
): Promise<ApiResult<any>> {
  return await get<any>(
    "/manage/v1/questionImport/questionImportDetail",
    params,
  );
}
//删除题目
export async function delQuestion(params?: any): Promise<ApiResult<any>> {
  return await get<any>("/manage/v1/question/delQuestion", params);
}
//移除题目
export async function removeQuestion(params?: any): Promise<ApiResult<any>> {
  return await get<any>("/manage/v1/question/removeQuestion", params);
}
//查询题目明细
export async function selectQuestionImportDetailById(
  params?: any,
): Promise<ApiResult<any>> {
  return await get<any>(
    "/manage/v1/question/selectQuestionImportDetailById",
    params,
  );
}
//编辑题目
export async function updateQuestion(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/question/updateQuestion", params);
}
